import React, { Component } from 'react';
import { Progress } from 'antd';
import zhanghuimg from '../../../img1/zhanghu1.png';
import { Link } from 'react-router-dom'
class myzhanghu extends Component {
    constructor(props){
        super(props);
        this.state={
            userinfo:{}
        }
    }
    componentWillMount(){
        if(localStorage.getItem('user_info')){
            this.setState({
                userinfo:JSON.parse(localStorage.getItem('user_info'))
            });
        }
        console.log(this.state.userinfo)
    }
    render() {
        return (
            <div className="myzhanghu">
                <div className="myzhanghu-t">
                    <p>
                    <img src={this.state.userinfo.headPic} alt=""/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您好，<i>{this.state.userinfo.nickName}</i>
                    </p>
                    <p>
                        <span>当前积分</span><span>666</span>
                    </p>
                    <Link to="/people/chongzhi">
                        <span>余额</span><span>￥22222.00</span>
                    </Link>
                    <p>
                        <span>易和券</span><span>2</span>
                    </p>
                </div>
                <div className="myzhanghu-c">
                    <p>我的会员等级<i>VIP2</i></p>
                    <div><i>V1</i><Progress percent={100} showInfo={false} status="active" strokeColor="#ec6a17" />
                    <i>V2</i><Progress percent={50} showInfo={false} status="active" strokeColor="#ec6a17" />
                    <i>V3</i><Progress percent={1} showInfo={false} status="active" strokeColor="#ec6a17" />
                    <i>V4</i><Progress percent={1} showInfo={false} status="active" strokeColor="#ec6a17" />
                    <i>V5</i><Progress percent={1} showInfo={false} status="active" strokeColor="#ec6a17" />
                    <i>V6</i><Progress percent={1} showInfo={false} status="active" strokeColor="#ec6a17" />
                    <i>V7</i></div>
                    <div className="xiamian">
                        <span>(0-500)</span>
                        <span>(500-1K)</span>
                        <span>(1k-20k)</span>
                        <span>(20k-50k)</span>
                        <span>(50k-60k)</span>
                        <span>(60k-70k)</span>
                        <span>(70k+)</span>
                    </div>
                </div>
                <div className="jianju"></div>
                <div className="myzhanghu-b">
                    <img src={zhanghuimg} alt=""/>
                </div>
            </div>
        );
    }
}

export default myzhanghu;